#!/bin/bash

# Configuration for verible-verilog-format
CONFIG="--inplace --indentation_spaces=4 --column_limit=120 --assignment_statement_alignment=align --module_net_variable_alignment=align"

# Find all .sv and .svh files in the current directory and subdirectories,
# and format them using verible-verilog-format.
find . -type f \( -name "*.sv" -o -name "*.svh" \) | while read -r file; do
    echo "Formatting: $file"
    ./verible-verilog-format $CONFIG "$file"
done

echo "Formatting complete."
